.class public Lcom/netease/newsreader/view/PullRefreshListView;
.super Landroid/widget/FrameLayout;
.source "PullRefreshListView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;,
        Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;,
        Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;,
        Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;
    }
.end annotation


# static fields
.field public static final INVALID_VALUE:I = -0x1

.field public static final REFRESH_STATE_IDLE:I = 0x0

.field public static final REFRESH_STATE_PREPARE_REFRESHING:I = 0x2

.field private static final REFRESH_STATE_PREPARE_REFRESH_DONE:I = 0x270f

.field public static final REFRESH_STATE_REFRESHING:I = 0x3

.field public static final REFRESH_STATE_SHOWING:I = 0x1


# instance fields
.field private mAnimateRefresh:Z

.field private mAnimationDuration:I

.field private mDragFactor:F

.field private mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

.field private mForbidPull:Z

.field private mHasTouchEvent:Z

.field private mInLayoutRunnable:Ljava/lang/Runnable;

.field private mLastMotionY:I

.field private mListView:Lcom/netease/newsreader/view/PullListView;

.field private mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

.field private mRefreshDoneTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

.field private mRefreshState:I

.field private mRefreshTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

.field private mRefreshView:Landroid/view/View;

.field private mTag:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 3
    .parameter "context"

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 84
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 43
    iput v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    .line 55
    const/high16 v0, 0x4000

    iput v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mDragFactor:F

    .line 57
    const/16 v0, 0x190

    iput v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimationDuration:I

    .line 59
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    .line 61
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mForbidPull:Z

    .line 65
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    invoke-direct {v0, p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    .line 67
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    invoke-direct {v0, p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshDoneTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    .line 69
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    .line 71
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    .line 85
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->init(Landroid/content/Context;)V

    .line 86
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 79
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 43
    iput v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    .line 55
    const/high16 v0, 0x4000

    iput v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mDragFactor:F

    .line 57
    const/16 v0, 0x190

    iput v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimationDuration:I

    .line 59
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    .line 61
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mForbidPull:Z

    .line 65
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    invoke-direct {v0, p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    .line 67
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    invoke-direct {v0, p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshDoneTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    .line 69
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    .line 71
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    .line 80
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->init(Landroid/content/Context;)V

    .line 81
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 3
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 74
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 43
    iput v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    .line 55
    const/high16 v0, 0x4000

    iput v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mDragFactor:F

    .line 57
    const/16 v0, 0x190

    iput v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimationDuration:I

    .line 59
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    .line 61
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mForbidPull:Z

    .line 65
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    invoke-direct {v0, p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    .line 67
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    invoke-direct {v0, p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshDoneTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    .line 69
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    .line 71
    iput-boolean v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    .line 75
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->init(Landroid/content/Context;)V

    .line 76
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/view/PullRefreshListView;IZ)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 396
    invoke-direct {p0, p1, p2}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    return-void
.end method

.method static synthetic access$1(Lcom/netease/newsreader/view/PullRefreshListView;)Lcom/netease/newsreader/view/PullListView;
    .locals 1
    .parameter

    .prologue
    .line 41
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    return-object v0
.end method

.method static synthetic access$2(Lcom/netease/newsreader/view/PullRefreshListView;)Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;
    .locals 1
    .parameter

    .prologue
    .line 45
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    return-object v0
.end method

.method static synthetic access$3(Lcom/netease/newsreader/view/PullRefreshListView;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 47
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mTag:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$4(Lcom/netease/newsreader/view/PullRefreshListView;)I
    .locals 1
    .parameter

    .prologue
    .line 57
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimationDuration:I

    return v0
.end method

.method static synthetic access$5(Lcom/netease/newsreader/view/PullRefreshListView;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 346
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->trackMotionScroll(I)V

    return-void
.end method

.method static synthetic access$6(Lcom/netease/newsreader/view/PullRefreshListView;)Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;
    .locals 1
    .parameter

    .prologue
    .line 59
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    return-object v0
.end method

.method static synthetic access$7(Lcom/netease/newsreader/view/PullRefreshListView;)Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;
    .locals 1
    .parameter

    .prologue
    .line 67
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshDoneTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshDoneTask;

    return-object v0
.end method

.method private getLimitedMotionScrollAmount(I)I
    .locals 2
    .parameter "deltaY"

    .prologue
    .line 356
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v0

    .line 361
    .local v0, scrollY:I
    if-gez p1, :cond_0

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getMeasuredHeight()I

    move-result v1

    neg-int v1, v1

    sub-int/2addr v1, v0

    invoke-static {v1, p1}, Ljava/lang/Math;->max(II)I

    move-result v1

    :goto_0
    return v1

    .line 362
    :cond_0
    rsub-int/lit8 v1, v0, 0x0

    .line 361
    invoke-static {v1, p1}, Ljava/lang/Math;->min(II)I

    move-result v1

    goto :goto_0
.end method

.method private getNextRefreshState()I
    .locals 3

    .prologue
    .line 378
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->isRefreshing()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 379
    const/4 v1, 0x3

    .line 393
    :goto_0
    return v1

    .line 382
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v0

    .line 385
    .local v0, scrollY:I
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getRefreshHeight()I

    move-result v2

    neg-int v2, v2

    if-gt v0, v2, :cond_1

    .line 386
    const/4 v1, 0x2

    .local v1, state:I
    goto :goto_0

    .line 387
    .end local v1           #state:I
    :cond_1
    if-gez v0, :cond_2

    .line 388
    const/4 v1, 0x1

    .restart local v1       #state:I
    goto :goto_0

    .line 390
    .end local v1           #state:I
    :cond_2
    const/4 v1, 0x0

    .restart local v1       #state:I
    goto :goto_0
.end method

.method private hideRefreshView()V
    .locals 2

    .prologue
    .line 580
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 581
    return-void
.end method

.method private init(Landroid/content/Context;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 91
    return-void
.end method

.method private onMove(I)Z
    .locals 4
    .parameter "deltaY"

    .prologue
    const/4 v1, 0x0

    .line 212
    if-lez p1, :cond_0

    .line 217
    int-to-float v2, p1

    iget v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mDragFactor:F

    div-float/2addr v2, v3

    float-to-int p1, v2

    .line 220
    :cond_0
    neg-int v2, p1

    invoke-direct {p0, v2}, Lcom/netease/newsreader/view/PullRefreshListView;->trackMotionScroll(I)V

    .line 221
    invoke-direct {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getNextRefreshState()I

    move-result v0

    .line 223
    .local v0, nextState:I
    const/4 v2, 0x3

    if-ne v0, v2, :cond_1

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->isRefreshing()Z

    move-result v2

    if-nez v2, :cond_2

    .line 226
    :cond_1
    invoke-direct {p0, v0, v1}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    .line 229
    :cond_2
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v2

    if-eqz v2, :cond_3

    const/4 v1, 0x1

    :cond_3
    return v1
.end method

.method private resetInternal()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 492
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    if-eqz v0, :cond_0

    .line 493
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/PullRefreshListView;->removeCallbacks(Ljava/lang/Runnable;)Z

    .line 495
    :cond_0
    iput-boolean v2, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    .line 496
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    const/4 v1, 0x1

    invoke-virtual {v0, v1, v2}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->stop(ZZ)V

    .line 497
    invoke-virtual {p0, v2, v2}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollTo(II)V

    .line 499
    return-void
.end method

.method private trackMotionScroll(I)V
    .locals 1
    .parameter "deltaY"

    .prologue
    .line 347
    if-nez p1, :cond_0

    .line 353
    :goto_0
    return-void

    .line 350
    :cond_0
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->getLimitedMotionScrollAmount(I)I

    move-result p1

    .line 352
    const/4 v0, 0x0

    invoke-virtual {p0, v0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollBy(II)V

    goto :goto_0
.end method

.method private updateRereshState(IZ)V
    .locals 8
    .parameter "state"
    .parameter "animate"

    .prologue
    const/16 v7, 0x270f

    const/4 v3, 0x3

    const/4 v6, 0x0

    .line 397
    iget v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    if-ne v4, p1, :cond_1

    .line 489
    :cond_0
    :goto_0
    :sswitch_0
    return-void

    .line 401
    :cond_1
    if-ne p1, v3, :cond_3

    .line 403
    iget-object v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    if-eqz v4, :cond_2

    iget-object v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mTag:Ljava/lang/String;

    invoke-interface {v4, v5}, Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;->onPrepareRefresh(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_3

    .line 404
    :cond_2
    const/4 p1, 0x0

    .line 408
    :cond_3
    iget v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    if-eq v4, p1, :cond_0

    .line 412
    iget v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    if-ne v4, v7, :cond_5

    move v0, v3

    .line 414
    .local v0, lastState:I
    :goto_1
    iput p1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    .line 415
    iget v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    if-ne v4, v7, :cond_6

    move v2, v3

    .line 419
    .local v2, newState:I
    :goto_2
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    if-eqz v3, :cond_4

    if-eq v2, v0, :cond_4

    .line 420
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    iget-object v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mTag:Ljava/lang/String;

    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    invoke-interface {v3, v4, v5, v0, v2}, Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;->updateRefreshView(Ljava/lang/String;Landroid/view/View;II)V

    .line 423
    :cond_4
    sparse-switch p1, :sswitch_data_0

    goto :goto_0

    .line 425
    :sswitch_1
    if-eqz p2, :cond_7

    .line 426
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v4

    neg-int v4, v4

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5, v6}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->startUsingDistance(ILjava/lang/Runnable;Z)V

    goto :goto_0

    .line 413
    .end local v0           #lastState:I
    .end local v2           #newState:I
    :cond_5
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    goto :goto_1

    .line 416
    .restart local v0       #lastState:I
    :cond_6
    iget v2, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    goto :goto_2

    .line 428
    .restart local v2       #newState:I
    :cond_7
    invoke-virtual {p0, v6, v6}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollTo(II)V

    goto :goto_0

    .line 439
    :sswitch_2
    iput-boolean p2, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    .line 440
    if-eqz p2, :cond_8

    .line 441
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getRefreshHeight()I

    move-result v4

    neg-int v4, v4

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v5

    sub-int/2addr v4, v5

    .line 442
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshTask:Lcom/netease/newsreader/view/PullRefreshListView$RefreshTask;

    .line 441
    invoke-virtual {v3, v4, v5, v6}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->startUsingDistance(ILjava/lang/Runnable;Z)V

    goto :goto_0

    .line 444
    :cond_8
    invoke-virtual {p0, v6, v6}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollTo(II)V

    .line 445
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    if-eqz v3, :cond_0

    .line 447
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    iget-object v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mTag:Ljava/lang/String;

    invoke-interface {v3, v4}, Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;->doRefresh(Ljava/lang/String;)V

    goto :goto_0

    .line 453
    :sswitch_3
    if-eqz p2, :cond_b

    iget-boolean v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    if-eqz v3, :cond_b

    .line 455
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/PullListView;->getChildCount()I

    move-result v3

    if-lez v3, :cond_9

    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/PullListView;->getFirstVisiblePosition()I

    move-result v3

    if-eqz v3, :cond_9

    .line 456
    invoke-virtual {p0, v6, v6}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollTo(II)V

    .line 457
    invoke-direct {p0, v6, v6}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto/16 :goto_0

    .line 459
    :cond_9
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/PullListView;->getFirstVisiblePosition()I

    move-result v3

    if-nez v3, :cond_a

    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v3, v6}, Lcom/netease/newsreader/view/PullListView;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    if-eqz v3, :cond_a

    .line 460
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getRefreshHeight()I

    move-result v3

    neg-int v3, v3

    iget-object v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v4, v6}, Lcom/netease/newsreader/view/PullListView;->getChildAt(I)Landroid/view/View;

    move-result-object v4

    invoke-virtual {v4}, Landroid/view/View;->getTop()I

    move-result v4

    sub-int/2addr v3, v4

    invoke-virtual {p0, v6, v3}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollBy(II)V

    .line 465
    :goto_3
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    .line 466
    invoke-virtual {v3}, Lcom/netease/newsreader/view/PullListView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    .line 465
    check-cast v1, Landroid/widget/FrameLayout$LayoutParams;

    .line 467
    .local v1, lp:Landroid/widget/FrameLayout$LayoutParams;
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getRefreshHeight()I

    move-result v3

    neg-int v3, v3

    iput v3, v1, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I

    .line 468
    iget-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v3}, Lcom/netease/newsreader/view/PullListView;->requestLayout()V

    .line 470
    new-instance v3, Lcom/netease/newsreader/view/PullRefreshListView$1;

    invoke-direct {v3, p0}, Lcom/netease/newsreader/view/PullRefreshListView$1;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;)V

    iput-object v3, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    .line 483
    .end local v1           #lp:Landroid/widget/FrameLayout$LayoutParams;
    :goto_4
    iput-boolean v6, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mAnimateRefresh:Z

    goto/16 :goto_0

    .line 462
    :cond_a
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getRefreshHeight()I

    move-result v3

    neg-int v3, v3

    invoke-virtual {p0, v6, v3}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollBy(II)V

    goto :goto_3

    .line 480
    :cond_b
    invoke-virtual {p0, v6, v6}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollTo(II)V

    .line 481
    invoke-direct {p0, v6, v6}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_4

    .line 423
    :sswitch_data_0
    .sparse-switch
        0x0 -> :sswitch_1
        0x1 -> :sswitch_0
        0x2 -> :sswitch_0
        0x3 -> :sswitch_2
        0x270f -> :sswitch_3
    .end sparse-switch
.end method

.method private willInterpreterTouchEvent(I)Z
    .locals 3
    .parameter "deltaY"

    .prologue
    const/4 v1, 0x0

    .line 366
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    .line 367
    .local v0, listView:Landroid/widget/ListView;
    if-lez p1, :cond_1

    .line 368
    invoke-virtual {v0}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v2

    if-eqz v2, :cond_0

    invoke-virtual {v0}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v2

    invoke-interface {v2}, Landroid/widget/ListAdapter;->getCount()I

    move-result v2

    if-eqz v2, :cond_0

    .line 369
    invoke-virtual {v0}, Landroid/widget/ListView;->getFirstVisiblePosition()I

    move-result v2

    if-nez v2, :cond_1

    .line 370
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    if-eqz v2, :cond_1

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/View;->getTop()I

    move-result v2

    if-nez v2, :cond_1

    :cond_0
    const/4 v1, 0x1

    :cond_1
    return v1
.end method


# virtual methods
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 7
    .parameter "ev"

    .prologue
    const/4 v6, 0x0

    .line 149
    const/4 v3, 0x0

    .line 150
    .local v3, scrollYOffset:I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v5

    packed-switch v5, :pswitch_data_0

    .line 188
    :cond_0
    :goto_0
    if-eqz v3, :cond_1

    .line 189
    neg-int v5, v3

    invoke-virtual {p0, v6, v5}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollBy(II)V

    .line 192
    :cond_1
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v2

    .line 194
    .local v2, ret:Z
    if-eqz v3, :cond_2

    .line 195
    invoke-virtual {p0, v6, v3}, Lcom/netease/newsreader/view/PullRefreshListView;->scrollBy(II)V

    .line 197
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-static {v5}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->access$0(Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;)Landroid/widget/Scroller;

    move-result-object v5

    invoke-virtual {v5}, Landroid/widget/Scroller;->isFinished()Z

    move-result v5

    if-eqz v5, :cond_2

    .line 198
    invoke-direct {p0, v3}, Lcom/netease/newsreader/view/PullRefreshListView;->onMove(I)Z

    move-result v5

    iput-boolean v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    .line 204
    :cond_2
    return v2

    .line 152
    .end local v2           #ret:Z
    :pswitch_0
    iput-boolean v6, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    .line 154
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v5

    float-to-int v5, v5

    iput v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mLastMotionY:I

    goto :goto_0

    .line 159
    :pswitch_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v5

    float-to-int v4, v5

    .line 161
    .local v4, y:I
    iget v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mLastMotionY:I

    sub-int v0, v4, v5

    .line 162
    .local v0, deltaY:I
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v5}, Lcom/netease/newsreader/view/PullListView;->hasTouchScrolled()Z

    move-result v1

    .line 164
    .local v1, hasListScrolled:Z
    iget-boolean v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    if-nez v5, :cond_3

    .line 165
    iget-boolean v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mForbidPull:Z

    if-nez v5, :cond_4

    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-static {v5}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->access$0(Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;)Landroid/widget/Scroller;

    move-result-object v5

    invoke-virtual {v5}, Landroid/widget/Scroller;->isFinished()Z

    move-result v5

    if-eqz v5, :cond_4

    if-eqz v1, :cond_4

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/PullRefreshListView;->onIntercept(I)Z

    move-result v5

    if-eqz v5, :cond_4

    const/4 v5, 0x1

    :goto_1
    iput-boolean v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    .line 167
    :cond_3
    iget-boolean v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    if-eqz v5, :cond_5

    .line 168
    move v3, v0

    .line 169
    iput v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mLastMotionY:I

    goto :goto_0

    :cond_4
    move v5, v6

    .line 165
    goto :goto_1

    .line 170
    :cond_5
    if-eqz v1, :cond_0

    .line 171
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-static {v5}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->access$0(Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;)Landroid/widget/Scroller;

    move-result-object v5

    invoke-virtual {v5}, Landroid/widget/Scroller;->isFinished()Z

    move-result v5

    if-nez v5, :cond_6

    .line 172
    move v3, v0

    .line 174
    :cond_6
    iput v4, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mLastMotionY:I

    goto :goto_0

    .line 180
    .end local v0           #deltaY:I
    .end local v1           #hasListScrolled:Z
    .end local v4           #y:I
    :pswitch_2
    iget-boolean v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mHasTouchEvent:Z

    if-eqz v5, :cond_0

    .line 181
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->onUp()V

    goto :goto_0

    .line 150
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public forbidPull(Z)V
    .locals 0
    .parameter "b"

    .prologue
    .line 569
    iput-boolean p1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mForbidPull:Z

    .line 571
    if-eqz p1, :cond_0

    .line 572
    invoke-direct {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->resetInternal()V

    .line 573
    invoke-direct {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->hideRefreshView()V

    .line 577
    :goto_0
    return-void

    .line 575
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->showRefreshView()V

    goto :goto_0
.end method

.method public getListView()Landroid/widget/ListView;
    .locals 1

    .prologue
    .line 599
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    return-object v0
.end method

.method public getRefreshHeight()I
    .locals 2

    .prologue
    .line 374
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    iget-object v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v1}, Lcom/netease/newsreader/view/PullListView;->getDividerHeight()I

    move-result v1

    add-int/2addr v0, v1

    return v0
.end method

.method public isRefreshing()Z
    .locals 2

    .prologue
    .line 502
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    const/4 v1, 0x3

    if-eq v0, v1, :cond_0

    .line 503
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    const/16 v1, 0x270f

    if-eq v0, v1, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    .line 502
    goto :goto_0
.end method

.method protected onFinishInflate()V
    .locals 1

    .prologue
    .line 95
    invoke-super {p0}, Landroid/widget/FrameLayout;->onFinishInflate()V

    .line 96
    const v0, 0x7f0c011e

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/PullRefreshListView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/view/PullListView;

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    .line 97
    return-void
.end method

.method public onIntercept(I)Z
    .locals 1
    .parameter "deltaY"

    .prologue
    .line 208
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-static {v0}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->access$0(Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;)Landroid/widget/Scroller;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Scroller;->isFinished()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/PullRefreshListView;->willInterpreterTouchEvent(I)Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method protected onLayout(ZIIII)V
    .locals 5
    .parameter "changed"
    .parameter "left"
    .parameter "top"
    .parameter "right"
    .parameter "bottom"

    .prologue
    const/4 v4, 0x0

    .line 102
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getMeasuredHeight()I

    move-result v1

    iget-object v2, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v2}, Lcom/netease/newsreader/view/PullListView;->getMeasuredHeight()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-static {v1, v4}, Ljava/lang/Math;->min(II)I

    move-result v1

    .line 103
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getMeasuredWidth()I

    move-result v2

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getMeasuredHeight()I

    move-result v3

    .line 102
    invoke-virtual {v0, v4, v1, v2, v3}, Lcom/netease/newsreader/view/PullListView;->layout(IIII)V

    .line 106
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    if-eqz v0, :cond_0

    .line 107
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/PullRefreshListView;->post(Ljava/lang/Runnable;)Z

    .line 108
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    .line 111
    :cond_0
    return-void
.end method

.method protected onMeasure(II)V
    .locals 8
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    const/high16 v7, 0x4000

    .line 115
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    invoke-virtual {v5}, Landroid/view/View;->getMeasuredHeight()I

    move-result v5

    if-nez v5, :cond_0

    .line 116
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v5, p1, p2}, Lcom/netease/newsreader/view/PullListView;->measureRefresh(II)V

    .line 119
    :cond_0
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v5}, Lcom/netease/newsreader/view/PullListView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/widget/FrameLayout$LayoutParams;

    .line 120
    .local v2, lp:Landroid/widget/FrameLayout$LayoutParams;
    iget v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    const/4 v6, 0x3

    if-ne v5, v6, :cond_1

    .line 121
    const/4 v5, 0x0

    iput v5, v2, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I

    .line 135
    :goto_0
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v4

    .line 136
    .local v4, measuredWidth:I
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v3

    .line 138
    .local v3, measuredHeight:I
    invoke-virtual {p0, v4, v3}, Lcom/netease/newsreader/view/PullRefreshListView;->setMeasuredDimension(II)V

    .line 140
    invoke-static {v7, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    .line 142
    .local v1, listMeasuredWidth:I
    iget v5, v2, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I

    sub-int v5, v3, v5

    .line 141
    invoke-static {v7, v5}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    .line 143
    .local v0, listMeasuredHeight:I
    iget-object v5, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v5, v1, v0}, Lcom/netease/newsreader/view/PullListView;->measure(II)V

    .line 145
    return-void

    .line 123
    .end local v0           #listMeasuredHeight:I
    .end local v1           #listMeasuredWidth:I
    .end local v3           #measuredHeight:I
    .end local v4           #measuredWidth:I
    :cond_1
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getRefreshHeight()I

    move-result v5

    neg-int v5, v5

    iput v5, v2, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I

    goto :goto_0
.end method

.method public onUp()V
    .locals 4

    .prologue
    const/4 v3, 0x3

    const/4 v2, 0x1

    .line 333
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-static {v0}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->access$0(Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;)Landroid/widget/Scroller;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Scroller;->isFinished()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 334
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    if-ne v0, v3, :cond_1

    .line 335
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v0

    if-gez v0, :cond_0

    .line 336
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mFlingRunnable:Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getScrollY()I

    move-result v1

    neg-int v1, v1

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/PullRefreshListView$FlingRunnable;->startUsingDistance(I)V

    .line 344
    :cond_0
    :goto_0
    return-void

    .line 338
    :cond_1
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    .line 339
    invoke-direct {p0, v3, v2}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_0

    .line 340
    :cond_2
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    if-ne v0, v2, :cond_0

    .line 341
    const/4 v0, 0x0

    invoke-direct {p0, v0, v2}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_0
.end method

.method public refresh()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 520
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getHeight()I

    move-result v0

    if-nez v0, :cond_2

    .line 521
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    if-eqz v0, :cond_1

    .line 551
    :cond_0
    :goto_0
    return-void

    .line 524
    :cond_1
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$2;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/PullRefreshListView$2;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    goto :goto_0

    .line 532
    :cond_2
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->isRefreshing()Z

    move-result v0

    if-nez v0, :cond_0

    .line 534
    iget-boolean v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mForbidPull:Z

    if-eqz v0, :cond_3

    .line 535
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/PullListView;->setSelection(I)V

    .line 536
    const/4 v0, 0x2

    invoke-direct {p0, v0, v1}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_0

    .line 538
    :cond_3
    new-instance v0, Lcom/netease/newsreader/view/PullRefreshListView$3;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/PullRefreshListView$3;-><init>(Lcom/netease/newsreader/view/PullRefreshListView;)V

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mInLayoutRunnable:Ljava/lang/Runnable;

    .line 544
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/PullListView;->setSelection(I)V

    .line 545
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->requestLayout()V

    goto :goto_0
.end method

.method public refreshDone()V
    .locals 2

    .prologue
    .line 512
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    const/4 v1, 0x3

    if-eq v0, v1, :cond_0

    .line 517
    :goto_0
    return-void

    .line 516
    :cond_0
    const/16 v0, 0x270f

    const/4 v1, 0x1

    invoke-direct {p0, v0, v1}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_0
.end method

.method public refreshDoneNoAnimate()V
    .locals 2

    .prologue
    .line 554
    iget v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshState:I

    const/4 v1, 0x3

    if-eq v0, v1, :cond_0

    .line 558
    :goto_0
    return-void

    .line 557
    :cond_0
    const/16 v0, 0x270f

    const/4 v1, 0x0

    invoke-direct {p0, v0, v1}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_0
.end method

.method public refreshNoAnimate()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 561
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->isRefreshing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 566
    :goto_0
    return-void

    .line 564
    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/PullListView;->setSelection(I)V

    .line 565
    const/4 v0, 0x3

    invoke-direct {p0, v0, v1}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    goto :goto_0
.end method

.method public reset()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 507
    invoke-direct {p0, v0, v0}, Lcom/netease/newsreader/view/PullRefreshListView;->updateRereshState(IZ)V

    .line 508
    invoke-direct {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->resetInternal()V

    .line 509
    return-void
.end method

.method public setOnRefreshListener(Ljava/lang/String;Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;)V
    .locals 0
    .parameter "tag"
    .parameter "l"

    .prologue
    .line 594
    iput-object p1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mTag:Ljava/lang/String;

    .line 595
    iput-object p2, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mOnRefreshListener:Lcom/netease/newsreader/view/PullRefreshListView$OnRefreshListener;

    .line 596
    return-void
.end method

.method public setRefreshView(I)V
    .locals 2
    .parameter "id"

    .prologue
    .line 588
    invoke-virtual {p0}, Lcom/netease/newsreader/view/PullRefreshListView;->getContext()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Lcom/netease/newsreader/view/PullRefreshListView;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    .line 589
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mListView:Lcom/netease/newsreader/view/PullListView;

    iget-object v1, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/PullListView;->setRefreshView(Landroid/view/View;)V

    .line 591
    return-void
.end method

.method public showRefreshView()V
    .locals 2

    .prologue
    .line 584
    iget-object v0, p0, Lcom/netease/newsreader/view/PullRefreshListView;->mRefreshView:Landroid/view/View;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 585
    return-void
.end method
